public class ISBN {

    public static void main(String[] args) throws Exception {
        System.out.println("9787302155638 " + ISBNTest.checkISBN("9787302155638"));
        System.out.println("7564105607 " + ISBNTest.checkISBN("7564105607"));
        System.out.println("730213880X " + ISBNTest.checkISBN("730213880X"));
        System.out.println("7302138800 " + ISBNTest.checkISBN("7302138800"));
        System.out.println("9790000000000 " + ISBNTest.checkISBN("9790000000000"));
        try {
            System.out.println(ISBNTest.checkISBN("9770000000000"));
        }catch(Exception e) {
            System.out.println("9770000000000 " + e.getMessage());
        }
        try {
            System.out.println(ISBNTest.checkISBN("123456545"));
        }catch(Exception e) {
            System.out.println("123456545 " + e.getMessage());
        }        
    }
}

 

